<@head title="vmvm资源分享网站">
</@head>
<@body>
浏览量:
<span class="badge badge-secondary" >${datas["view_count"]?c}</span>/
<button type="button" id="likeBT" class="btn btn-primary">喜欢
<span class="badge badge-light" id="likeBTDIV">${datas["like_count"]?c}</span>
</button>

<br>

<#if datas["extName"]=="jpg"|| datas["extName"]=="png"|| datas["extName"]=="gif">
<img src="${datas["link"]!}" style="width: 100%;">
<#else>
<video controls="controls" preload="auto" style="width: 100%;">
  <source src="${datas["link"]!}" type="video/${datas["extName"]!}" />
Your browser does not support the video tag.
</video>

</#if>




</@body>






<@js>


$("#likeBT").click(function(){
$.post("/likeFile", { id: ${datas["id"]?c} },
   function(data){
        console.log(data); //  2pm
        $("#likeBTDIV").html(parseInt($("#likeBTDIV").html())+1);
   });

});


</@js>